package com.oms.bean;

/*
 * 分页组件
 */
public class MyPageRoll {
	private int currPage=1;//当前页
	private int pageSize=2;//每页的记录数
	private int pageCount;//总页数
	private int tatalCount;//总记录数
	
	public int getCurrPage() {
		return currPage;
	}
	public void setCurrPage(int currPage) {
		this.currPage = currPage;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	//总页数
	public int getPageCount() {
		if (tatalCount % pageSize==0) {
			pageCount=tatalCount / pageSize;
		}else {
			pageCount=tatalCount / pageSize + 1;
		}
		return pageCount;
	}
	//不需要pageCount的set方法，是从数据库里面读取出来后计算得到
//	public void setPageCount(int pageCount) {
//		this.pageCount = pageCount;
//	}
	public int getTatalCount() {
		return tatalCount;
	}
	public void setTatalCount(int tatalCount) {
		this.tatalCount = tatalCount;
	}
}
